<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改智能AI识别模型版本管理')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-VersionService-edit" th:object="${aiIdentifyModelVersionT}">
            <input name="versionId" th:field="*{versionId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">模型ID：</label>
                <div class="col-sm-8">
                    <input name="modelId" th:field="*{modelId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">版本号：</label>
                <div class="col-sm-8">
                    <input name="version" th:field="*{version}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">最新发布时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="publishTime" th:value="${#dates.format(aiIdentifyModelVersionT.publishTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">训练时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="trainTime" th:value="${#dates.format(aiIdentifyModelVersionT.trainTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">模型备注：</label>
                <div class="col-sm-8">
                    <textarea name="versionRemark" class="form-control">[[*{versionRemark}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">版本资源路径：</label>
                <div class="col-sm-8">
                    <input name="resourcePath" th:field="*{resourcePath}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">训练进度：</label>
                <div class="col-sm-8">
                    <input name="progress" th:field="*{progress}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">训练准确度：</label>
                <div class="col-sm-8">
                    <input name="accuracy" th:field="*{accuracy}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "AI/VersionService";
        $("#form-VersionService-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-VersionService-edit').serialize());
            }
        }

        $("input[name='publishTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='trainTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>